<?php

global $_GPC, $_W;

// $action = 'ad';

// $title = $this->actions_titles[$action];

$GLOBALS['frames'] = $this->getMainMenu();

$item=pdo_get('snx_system',array('uniacid'=>$_W['uniacid']));

    if(checksubmit('submit')){

            $data['dy_details']=html_entity_decode($_GPC['dy_details']);

         

            $data['uniacid']=trim($_W['uniacid']);

         

     

            if($_GPC['id']==''){                

                $res=pdo_insert('snx_system',$data);

                if($res){

                    message('添加成功',$this->createWebUrl('prizerule',array()),'success');

                }else{

                    message('添加失败','','error');

                }

            }else{

                $res = pdo_update('snx_system', $data, array('id' => $_GPC['id']));

                if($res){

                    message('编辑成功',$this->createWebUrl('prizerule',array()),'success');

                }else{

                    message('编辑失败','','error');

                }

            }

        }

    include $this->template('web/prizerule');